package com.lyf.design.practice.theory.create.factory;

/**
 * @author LYF
 * @date 2022/6/20
 */
public class SimpleFactory {
       static Product create(String args,String... attributes){
           switch (args){
               case "A": return new ProductA(attributes[0]);
               case "B": return new ProductB(attributes[0],attributes[1]);
           }
           return null;
       }
}
